home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-10-18 | 5.3 KB | 266 lines | [TEXT/MPS ] |
- #include "SysTypes.r"
- #include "Types.r"
-
- #define kPrefSize 60
- #define kMinSize 48
-
- #define kMinHeap (34 * 1024)
- #define kMinSpace (20 * 1024)
-
- /* id of our STR# for specific error strings */
- #define kMacTutorAppErrStrings 129
-
- /* Indices into STR# resources. */
- #define eNoMemory 1
- #define eNoWindow 2
-
- #define rMenuBar 128 /* application's menu bar */
- #define rAboutAlert 128 /* about alert */
- #define rDocWindow 128 /* application's window */
-
- #define mApple 128 /* Apple menu */
- #define iAbout 1
-
- #define mFile 129 /* File menu */
- #define iNew 1
- #define iClose 4
- #define iQuit 12
-
- #define mEdit 130 /* Edit menu */
- #define iUndo 1
- #define iCut 3
- #define iCopy 4
- #define iPaste 5
- #define iClear 6
-
- #define myMenu 131 /* Sample menu */
- #define item1 1
- #define item2 2
- #define item3 3
- #define item5 5
-
- resource 'vers' (1) {
- 0x01, 0x00, release, 0x00,
- verUS,
- "1.00",
- "1.00, Copyright © 1989 J. Langowski / MacTutor"
- };
-
- resource 'MBAR' (rMenuBar, preload) {
- { mApple, mFile, mEdit, myMenu }; /* four menus */
- };
-
-
- resource 'MENU' (mApple, preload) {
- mApple, textMenuProc,
- 0b1111111111111111111111111111101, /* disable dashed line, enable About and DAs */
- enabled, apple,
- {
- "About CPlusMacTutorApp…",
- noicon, nokey, nomark, plain;
- "-",
- noicon, nokey, nomark, plain
- }
- };
-
- resource 'MENU' (mFile, preload) {
- mFile, textMenuProc,
- 0b0000000000000000000100000000000, /* program enables others */
- enabled, "File",
- {
- "New",
- noicon, "N", nomark, plain;
- "Open",
- noicon, "O", nomark, plain;
- "-",
- noicon, nokey, nomark, plain;
- "Close",
- noicon, "W", nomark, plain;
- "Save",
- noicon, "S", nomark, plain;
- "Save As…",
- noicon, nokey, nomark, plain;
- "Revert",
- noicon, nokey, nomark, plain;
- "-",
- noicon, nokey, nomark, plain;
- "Page Setup…",
- noicon, nokey, nomark, plain;
- "Print…",
- noicon, nokey, nomark, plain;
- "-",
- noicon, nokey, nomark, plain;
- "Quit",
- noicon, "Q", nomark, plain
- }
- };
-
- resource 'MENU' (mEdit, preload) {
- mEdit, textMenuProc,
- 0b0000000000000000000000000000000, /* program does the enabling */
- enabled, "Edit",
- {
- "Undo",
- noicon, "Z", nomark, plain;
- "-",
- noicon, nokey, nomark, plain;
- "Cut",
- noicon, "X", nomark, plain;
- "Copy",
- noicon, "C", nomark, plain;
- "Paste",
- noicon, "V", nomark, plain;
- "Clear",
- noicon, nokey, nomark, plain
- }
- };
-
- resource 'MENU' (myMenu, preload) {
- myMenu, textMenuProc,
- 0b0000000000000000000000000000000,
- enabled, "Strings",
- { /* array: 5 elements */
- /* [1] */
- "C++", noIcon, nokey, noMark, plain,
- /* [2] */
- "Sample", noIcon, nokey, noMark, plain,
- /* [3] */
- "Application", noIcon, nokey, noMark, plain,
- /* [4] */
- "-", noIcon, noKey, noMark, plain,
- /* [5] */
- "Have Fun", noIcon, nokey, noMark, plain
- }
- };
-
- /* the About screen */
-
- resource 'ALRT' (rAboutAlert, purgeable) {
- {40, 20, 190, 360 }, rAboutAlert, {
- OK, visible, silent;
- OK, visible, silent;
- OK, visible, silent;
- OK, visible, silent
- };
- };
-
- resource 'DITL' (rAboutAlert, purgeable) {
- { /* array DITLarray: 5 elements */
- /* [1] */
- {120, 240, 140, 320},
- Button {
- enabled,
- "OK"
- },
- /* [2] */
- {8, 8, 24, 320 },
- StaticText {
- disabled,
- "MacTutorApp: C++ mini-application skeleton"
- },
- /* [3] */
- {32, 8, 48, 320},
- StaticText {
- disabled,
- "Copyright © 1989 J. Langowski / MacTutor"
- },
- /* [4] */
- {56, 8, 72, 320},
- StaticText {
- disabled,
- "[Based on examples by Apple MacDTS]"
- },
- /* [5] */
- {80, 8, 112, 320},
- StaticText {
- disabled,
- "Expand this application to your own taste"
- }
- }
- };
-
-
- resource 'WIND' (rDocWindow, preload, purgeable) {
- {64, 60, 314, 460},
- noGrowDocProc, invisible, goAway, 0x0, "MacTutor C++ demo"
- };
-
-
- resource 'STR#' (kMacTutorAppErrStrings, purgeable) {
- {
- "Not enough memory to run MacTutorApp";
- "Cannot create window";
- }
- };
-
- resource 'SIZE' (-1) {
- dontSaveScreen,
- acceptSuspendResumeEvents,
- enableOptionSwitch,
- canBackground,
- multiFinderAware,
- backgroundAndForeground,
- dontGetFrontClicks,
- ignoreChildDiedEvents,
- is32BitCompatible,
- reserved, reserved, reserved, reserved,
- reserved, reserved, reserved,
- kPrefSize * 1024,
- kMinSize * 1024
- };
-
-
- type 'JLMT' as 'STR ';
-
-
- resource 'JLMT' (0) {
- "MacTutor C++ Sample Application"
- };
-
-
- resource 'BNDL' (128) {
- 'JLMT',
- 0,
- {
- 'ICN#',
- {
- 0, 128
- },
- 'FREF',
- {
- 0, 128
- }
- }
- };
-
-
- resource 'FREF' (128) {
- 'APPL',
- 0,
- ""
- };
-
- resource 'ICN#' (128) {
- { /* array: 2 elements */
- /* [1] */
- $"00 01 80 00 00 07 E0 00 00 1F F8 00 00 7F FE 00"
- $"01 FF FF 80 07 FF FF E0 0F FF 0F F8 07 FF 33 FC"
- $"03 FF FC 38 06 FF FF C8 0C 3F FF FE 08 0F FF D6"
- $"08 03 FF 96 08 F0 FF 19 09 F8 3E 16 09 88 0C 19"
- $"08 00 00 16 08 00 00 10 0B 1E 78 D0 0B FF FF D0"
- $"09 FF FF 90 FC 7E 7E 3E 96 00 00 6A D3 FF FF CA"
- $"52 00 00 4A 53 FF FF CB A6 38 70 69 DC 44 88 3F"
- $"1F 38 73 98 38 87 04 4C 67 08 83 86 7F FF FF FE",
- /* [2] */
- $"00 07 E0 00 00 1F F8 00 00 7F FE 00 01 FF FF 80"
- $"07 FF FF E0 1F FF FF F8 1F FF FF FC 0F FF FF FE"
- $"07 FF FF FC 07 FF FF F8 0F FF FF FE 0F FF FF FE"
- $"0F FF FF FE 0F FF FF FF 0F FF FF FE 0F FF FF FF"
- $"0F FF FF F6 0F FF FF F0 0F FF FF F0 0F FF FF F0"
- $"0F FF FF F0 FF FF FF FE F7 FF FF EE F3 FF FF CE"
- $"73 FF FF CE 73 FF FF CF E7 FF FF EF DF FF FF FF"
- $"1F FF FF F8 7F FF FF FE FF FF FF FF FF FF FF FF"
- }
- };
-
-